<?php $this; /* @var $this \Comm\View */  ?>
<?php $this->_block('content'); ?>
<?php if(!empty($articles['result'])) : ?>



<form id="form-manage-category-result" action="<?= $this->path('aj/manage/category/destroy') ?>" class="form-inline" method="post" onsubmit="return false">
<div class="panel panel-default">
	<table class="table table-hover table-bordered">
		<thead>
			<tr>
				<th width="100" class="text-center">ID</th>
				<th width="130" class="text-center"><?= _('分类') ?></th>
				<th class="text-center"><?= _('标题') ?></th>
				<th width="100" class="text-center"><?= _('状态') ?></th>
				<th width="150" class="text-center"><?= _('发表时间') ?></th>
				<th width="150" class="text-center"><?= _('发布时间') ?></th>
				<th width="100" class="text-center"><?= _('操作') ?></th>
			</tr>
		</thead>
		<tbody>
			<?php foreach($articles['result'] as $value) : ?>
			<tr>
				<td class="text-center"><?= $value['id'] ?></td>
				<td class="text-center"><?= $categorys[$value['category_id']]['name'] ?></td>
				<td><?= $value['title'] ?></td>
				<td class="text-center"><?= _(\Model\Article::showStateName($value['state'])) ?></td>
				<td class="text-center"><?= $value['create_time'] ?></td>
				<td class="text-center"><?= $value['publish_time'] ?></td>
				<td class="text-center">
				    <a href="javascript:alert('开发中');" class="btn btn-xs btn-default" role="button">编辑</a>
				    <a href="javascript:alert('开发中');" class="btn btn-xs btn-default" role="button">删除</a>
				</td>
			</tr>
			<?php endforeach; ?>
		</tbody>
	</table>
	<div class="panel-footer"><?= $this->_include('_inc/pager', ['pager' => $pager]) ?></div>
</div>
</form>
<?php endif; ?>


<?php $this->_blockEnd(); ?>
<?php $this->_block('body_end')?>
<?php $this->js('manage/article/index.js'); ?>
<?php $this->_blockEnd()?>
<?php $this->_blockLoad('_block/manage', ['nav'=>'article']) ?>